home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-08-16 | 5.6 KB | 246 lines | [TEXT/MPS ] |
-
- /*
- * This file was generated by the SOM Compiler.
- * FileName: SLResour.xh.
- * Generated using:
- * SOM Precompiler somipc: 2.18
- * SOM Emitter emitxh.dll: 2.33
- */
-
- /*
- *
- *
- * File: SLResour.idl
- * Release Version: $ ODF 1 $
- *
- * Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
- *
- *
- */
-
-
- #ifndef SOM_FW_OResource_xh
- #define SOM_FW_OResource_xh
-
- class FW_OResource;
-
- #define FW_OResource_MajorVersion 1
- #define FW_OResource_MinorVersion 0
-
- /*
- * Passthru lines: File: "C.xh", "before"
- */
-
-
- /* C++ SOM defs */
- #include <somcls.xh>
- #include <somcm.xh>
-
- /* C++ parent defs */
- #ifndef SOM_FW_ORefCount_xh
- #include <SLRefCnt.xh>
- #endif
-
- #ifndef FW_OResource_API
- #define FW_OResource_API
- /*
- * -- The Class API
- */
-
- /*
- * Start of user-defined types:
- */
- class SOMClass;
- class SOMObject;
- class FW_ORefCount;
- class FW_OResource;
- typedef
- short FW_ResourceFileID;
- typedef
- FW_PlatformHandle FW_ResourceHandle;
- class shutUpAboutTheCommentAlready;
- class FW_OResourceFile;
-
- /*
- * End of user-defined types.
- */
-
- #ifdef OLDIBMSOMAPISUPPORT
- #define FW_OResourceCClassData FW_OResourceClassData
- #define FW_OResourceNewClass(major,minor) somNewVersionedClassReference(FW_OResource,major,minor)
- #endif
-
- /* define xxxMetaClass macro to facilitate (cls ## MetaClass) */
- #define FW_OResourceMetaClass SOMClass
-
- #if PRAGMA_ALIGN_SUPPORTED
- # pragma options align=power
- #endif
-
- /* The API to the FW_OResource class object, and the methods it introduces. */
- SOMEXTERN struct FW_OResourceClassDataStructure {
- #ifdef OLDIBMSOMAPISUPPORT
- SOMClass *classObject; /* always zero, use somNewClassReference instead */
- #else
- long zero;
- #endif
- somStaticClassInfo *sci;
- somDToken instanceDataToken;
- long reserved [3];
- somMToken somInit;
- somMToken somUninit;
- somMToken InitFromFile;
- somMToken AcquireData;
- somMToken ReleaseData;
- somMToken GetSize;
- somMToken GetResourceHandle;
- } SOMDLINK FW_OResourceClassData;
-
- #if PRAGMA_ALIGN_SUPPORTED
- # pragma options align=reset
- #endif
-
- #if !defined(FW_OResource_Class_Source) && !defined(SOM_Module_slresour_Source)
- #if PRAGMA_IMPORT_SUPPORTED
- #pragma import list FW_OResourceClassData
- #endif
- #endif
-
-
- /*
- * -- Typedefs and inline method declarations for left path inherited methods
- * -- are omitted because this compilation had -museinheritedmethods in effect
- */
-
-
- /*
- * -- Typedefs for FW_OResource Method Procedures
- */
- SOMEXTERN {
- typedef void (* SOMLINK somTD_FW_OResource_InitFromFile)(FW_OResource *somSelf, Environment *ev,
- FW_OResourceFile* file,
- FW_ResourceId resourceId,
- FW_ResourceType resourceType);
- typedef void* (* SOMLINK somTD_FW_OResource_AcquireData)(FW_OResource *somSelf, Environment *ev);
- typedef void (* SOMLINK somTD_FW_OResource_ReleaseData)(FW_OResource *somSelf, Environment *ev);
- typedef unsigned long (* SOMLINK somTD_FW_OResource_GetSize)(FW_OResource *somSelf, Environment *ev);
- typedef FW_ResourceHandle (* SOMLINK somTD_FW_OResource_GetResourceHandle)(FW_OResource *somSelf, Environment *ev);
- }
-
- #endif /* FW_OResource_API */
-
-
- /*
- * -- This emitter treats Method Tokens as Thunks by default.
- * -- Use the sc modifier "nothunks" to change this default
- */
- #undef somresolve_
- #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
-
- /*
- * -- The C++ Wrapper Class for FW_OResource
- */
- class FW_OResource : public FW_ORefCount
- {
- public:
-
- // FW_OResource::new registers use of the class object, and then uses somNew
- // to allocate memory and load the object method table pointer.
- void *operator new(size_t size)
- {
- SOM_IgnoreWarning(size);
- // Allocate memory using the default allocator for FW_OResource, and
- // clear mem & set method table pointer, call basic initialization
- #ifdef SOMCHKNULL
- void * __somResult = (void *)
- somNewObject(FW_OResource);
- SOMCHKNULL(__somResult);
- return __somResult;
- #else
- return (void*) somNewObject(FW_OResource);
- #endif
- }
-
- // FW_OResource::delete uses the default deallocator for the object's class.
- void operator delete(void * obj)
- {
- if (obj) {
- SOM_Resolve(obj,SOMObject,somFree)
- ( (SOMObject*) obj );
- }
- }
-
- /* method: InitFromFile */
- void InitFromFile(Environment *ev,
- FW_OResourceFile* file,
- FW_ResourceId resourceId,
- FW_ResourceType resourceType)
- {
- SOM_ResolveD(this,FW_OResource,FW_OResource,InitFromFile)
- (this,ev,file,resourceId,resourceType);
- #ifdef SOMCHKEXCEPT
- SOMCHKEXCEPT;
- #endif
- }
-
- /* method: AcquireData */
- void* AcquireData(Environment *ev)
- {
- #ifdef SOMCHKEXCEPT
- void* __somResult =
- SOM_ResolveD(this,FW_OResource,FW_OResource,AcquireData)
- (this,ev);
- SOMCHKEXCEPT;
- return __somResult;
- #else
- return SOM_ResolveD(this,FW_OResource,FW_OResource,AcquireData)
- (this,ev);
- #endif
- }
-
- /* method: ReleaseData */
- void ReleaseData(Environment *ev)
- {
- SOM_ResolveD(this,FW_OResource,FW_OResource,ReleaseData)
- (this,ev);
- #ifdef SOMCHKEXCEPT
- SOMCHKEXCEPT;
- #endif
- }
-
- /* method: GetSize */
- unsigned long GetSize(Environment *ev)
- {
- #ifdef SOMCHKEXCEPT
- unsigned long __somResult =
- SOM_ResolveD(this,FW_OResource,FW_OResource,GetSize)
- (this,ev);
- SOMCHKEXCEPT;
- return __somResult;
- #else
- return SOM_ResolveD(this,FW_OResource,FW_OResource,GetSize)
- (this,ev);
- #endif
- }
-
- /* method: GetResourceHandle */
- FW_ResourceHandle GetResourceHandle(Environment *ev)
- {
- #ifdef SOMCHKEXCEPT
- FW_ResourceHandle __somResult =
- SOM_ResolveD(this,FW_OResource,FW_OResource,GetResourceHandle)
- (this,ev);
- SOMCHKEXCEPT;
- return __somResult;
- #else
- return SOM_ResolveD(this,FW_OResource,FW_OResource,GetResourceHandle)
- (this,ev);
- #endif
- }
-
- }; /* FW_OResource */
-
-
-
- #endif /* SOM_FW_OResource_xh */
-